#!/usr/bin/env python3

import a
import numpy as np

obj = a.a()

try:
    obj.main(np.array([1,2,3], dtype=np.float32),
             np.array([-1], dtype=np.int32))
except Exception as e:
    assert("Index [-1] out of bounds" in str(e))

res = obj.main(np.array([1,2,3], dtype=np.float32),
               np.array([0], dtype=np.int32))
assert(res[0] == 1)
